import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;

public class ColMethod {
    public static void main(String[] args) throws Exception {
        test2();
    }

    public static void test() {
        Collection list = new ArrayList();
        list.add("list");
        list.add(true);
        list.add(1); // 自动装箱
        System.out.println(list);
        list.remove(0);
        System.out.println(list);
        list.remove(new Integer(1));
        System.out.println(list);
        System.out.println(list.contains(new Boolean(true)));
        System.out.println(list.size());
        System.out.println(list.isEmpty());
        list.clear();
        ArrayList list2 = new ArrayList();
        list2.add("list2");
        list2.add("list2");
        list.addAll(list2);
        System.out.println(list);
        list.removeAll(list2);
        System.out.println(list);
    }

    public static void test2() {
        Collection<Long> list = new ArrayList<Long>();
        list.add(1L);
        list.add(2L);
        list.add(3L);
        Collection<Long> list2 = new ArrayList<Long>();
        // list2.add(2L);
        // list2.add(2L);
        // list2.add(4L);
        list.removeAll(list2);
        System.out.println(list);
    }
}
